//
//  MainViewController.h
//
//  Created by Hannes Kappl, Storm Christoph on 12/23/09.
//  Copyright __MyCompanyName__ 2009. All rights reserved.
//
//	represents the controller of the game view
//

#import <UIKit/UIKit.h>


#import "FlipsideViewController.h"
#import "Card.h"
#import "Card.h"
#import "MyPoint.h"
#import "GameController.h"
#import "AccelerometerFilter.h"

@class AccelerometerFilter;

@interface MainViewController : UIViewController <UIAccelerometerDelegate, FlipsideViewControllerDelegate> {
	
	IBOutlet UIButton *firstButton;
	IBOutlet UILabel *labelRound;
	IBOutlet UILabel *labelPoints;
	IBOutlet UIProgressView *timeBar;
	
	IBOutlet UIView *containerView;
	IBOutlet UIImageView *mainView;
	IBOutlet UIImageView *flipToView;
	
	CGRect frame;
	
	AccelerometerFilter *filter;
	
}

@property (nonatomic, retain) UIView *containerView;
@property (nonatomic, retain) UIImageView *mainView;
@property (nonatomic, retain) UIImageView *flipToView;
@property (nonatomic, retain) UILabel *labelRound;
@property (nonatomic, retain) UILabel *labelPoints;
@property (nonatomic, retain) UIProgressView *timeBar;


- (Card*) createCardWithX:(int)xPos Y:(int)yPos Counter:(int)counterID Group:(int)groupID;
- (void) createCards;
- (void) calculatePositions:(int) nrOfCards;
- (void) onTimer;
- (void) onGameSolved:(int) seconds round:(int) roundNr;
- (void) onShake;
- (void) updateTimerBar:(CGFloat) progress;
- (void) startNewGameAndReset:(bool) reset;
- (void) addPoints:(int) points;

- (IBAction)showInfo;

@end
